package com.mj.Set;

/**
 * @Author: LDeng
 * @Date: 2021-03-10 8:43
 */
public interface Set<E> {

    int size();

    boolean isEmpty();

    void clear();

    boolean contains(E element);

    void add(E element);

    void remove(E element);

    void traversal(Visitor visitor);

    public static abstract class Visitor<E> {
        boolean stop;

        abstract boolean visit(E element);
    }


}
